<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script type="text/javascript">
var addOffice = function(){
	window.location.href="${contextPath}/index/add_office.htm";
}
var search = function(){
	var center = $("#nickname").val();
	window.location.href="${contextPath}/index/office_list.htm?center="+center;
}
var getXiaZai = function(){
	
	$.post('/achieve/system_static_weekXz.json',{
		
	},function(data){
		if(data){
			if(data.name!=null){
				window.location.href = "http://www.yueqiao.org/mydata/uploadtea/xls/"+data.name;
			}
		}
	});
}
</script>
</head>
<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>系统管理</li>
			<li>&gt;</li>
			<li class="current">中心地址管理</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table class="form_table">
			<tr>
			<td>
				<label><b>请输入市或区名称查询：</b></label><input type="text" name="nickname" id="nickname" size="25" value="" />
				<input type="button" value=" 查 询 " onclick="search()" />
				<label><b>增加新地址：</b></label> <input id="btnAdd" onclick="addOffice()" type="button" value=" 立即添加新的中心地址 " /></td>
				<td><input type="button" value=" 下 载 " onclick="getXiaZai" /></td>
			</tr>
		</table>
		<table>
			<tr class="fields">
				<th width="150">中心地址名称</th>
				<th width="150">手机号码</th>
				<th width="150">座机号码</th>
				<th title="咨询师休息时间，暂停预约">休息日</th>
				<th>地址</th>
				<th width="100">操作</th>
			</tr>
			
			<#if list??>
				<#list list as list>
				<tr>
					<td align="center" ><a href="${contextPath}/index/system_office.htm?keyname=${list.keyname}&center=${list.name}">${list.name}</a></td>
					<td>${list.inphone}</td>
					<td>${list.outphone}</td>
					<td>${list.restday}</td>
					<td>${list.address}</td>
					<td align="center"><a href="${contextPath}/index/add_office.htm?keyname=${list.keyname}">修改信息</a></td>
				</tr>
				</#list>
			<#else>
				<tr><td colspan="5">暂未添加中心地址。</td></tr>
			</#if>
		</table>
	</div>
	<div id="pager">
		<ul id="pagination">
			<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/office_list.htm?currPage=${currpage-1}">上一页</a></li>
					</#if>
					
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/office_list.htm?currPage=${index_up}">${index_up}</a></li>  
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/office_list.htm?currPage=${index_up}">${index_up}</a></li> 
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/office_list.htm?currPage=${pagetotal}">${pagetotal}</a></li>  
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/office_list.htm?currPage=1">1</a></li>  
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/office_list.htm?currPage=${index_up}">${index_up}</a></li>  
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/office_list.htm?currPage=${pagetotal}">${pagetotal}</a></li>   
			<#else>
				<li><a href="${contextPath}/index/office_list.htm?currPage=1">1</a></li> 
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/office_list.htm?currPage=${index_up}">${index_up}</a></li> 
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/office_list.htm?currPage=${currpage+1}">下一页</a></li>
		</#if>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
		</ul>
	</div>
	<div class="emptyline"></div>
</body>
</html>